class Singlelaze {

    private static Singlelaze singlelaze = null;
    private static Object locker = new Object();

    private Singlelaze() {

    }

    public static Singlelaze getSinglelaze() {
        if (singlelaze == null) {
            synchronized (locker) {
                if (singlelaze == null) {
                    singlelaze = new Singlelaze();
                }
            }
        }


        return singlelaze;
    }
}


public class Demo3 {

    public static void main(String[] args) {

//        Singlelaze singlelaze = new Singlelaze();

        Singlelaze singlelaze = Singlelaze.getSinglelaze();
    }

}
